package com.threeonemeeting.list;

import java.util.ArrayList;

import com.threeonemeeting.model.EnrollUserInfo;

public class EnrollUserInfoList {

	public ArrayList<EnrollUserInfo> listEnrollUsers = new ArrayList<EnrollUserInfo>();

	public int size() {
		return listEnrollUsers.size();
	}

	public EnrollUserInfo get(int nLocation) {
		return listEnrollUsers.get(nLocation);
	}

	public void clear() {
		listEnrollUsers.clear();
	}

	public void addEnrollUserInfo(EnrollUserInfo info) {
		for (int i = 0; i < listEnrollUsers.size(); i++) {
			EnrollUserInfo aInfo = listEnrollUsers.get(i);
			if (aInfo == null)
				continue;

			if (aInfo.nUserId == info.nUserId)
				return;
		}

		listEnrollUsers.add(info);
	}

}
